﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace FileOP
{
    /// <summary>
    /// 文件的基类
    /// </summary>
    public class BaseFile
    {
        public string FilePath { get; set; }
        public string FileName { get; set; }

        public BaseFile(string filePath, string fileName)
        {
            this.FileName = fileName;
            this.FilePath = filePath;
        }

        //调用进程，打开制定的文件
        public void OpenFile()
        {
            ProcessStartInfo psi = new ProcessStartInfo(this.FilePath + "\\" + this.FileName);
            Process pro = new Process();
            pro.StartInfo = psi;
            pro.StartInfo.UseShellExecute = true;
            pro.Start();
        }
    }
}
